package homework.day05;


/**
 * @author ThinkBook
 */
public class Test10 {
    public static void main(String[] args) {
        Teacher t = new Teacher();
        t.show();
        System.out.println("-----------");
        t.disp();
    }
}
class Teacher {
    //显式初始化
    private String name;
    private int age;
    private String gender = "男";


    public void show() {
        String name = "tom";
        int age = 20;
        System.out.println("name：" + name);
        System.out.println("age：" + age);
        System.out.println("gender：" + gender);
    }
        public Teacher(){
        name = "jack";
        age = 18;
    }
   public void disp() {
       //String name = "jack";
       //int age = 18;
        System.out.println("this.age：" + this.age);
        System.out.println("this.name：" + this.name);
        System.out.println("this.gender：" + this.gender);
    }
}
